import request from '@/utils/request'
import qs from 'qs'

export function proPagesApi(data) {
  return request({
    url: '/project/page',
    method: 'get',
    params: data,
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}

export function addProjectApi(data) {
  return request({
    url: '/project',
    method: 'post',
    data
  })
}

export function VEPagesApi(data) {
  return request({
    url: '/user/page',
    method: 'get',
    params: data,
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}

export function VEProjectApi(data) {
  return request({
    url: '/project/page',
    method: 'get',
    params: data,
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}

export function ChangeApi(data) {
  return request({
    url: '/module/up',
    method: 'put',
    params: data,
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}

export function getInfoApi() {
  return request({
    url: '/user',
    method: 'get',
  })
}
